//
//  YWYoukuDetailHeaderView.m
//  videoTest3
//
//  Created by jun peng on 2022/7/14.
//

#import "YWYoukuDetailHeaderView.h"

@interface YWYoukuDetailHeaderView ()
@property (weak, nonatomic) IBOutlet UIButton *downloadBtn;
@property (weak, nonatomic) IBOutlet UIButton *saveToAlbumBtn;
- (IBAction)saveToAlbumBtnClick:(UIButton *)sender;

- (IBAction)downloadBtnClick:(UIButton *)sender;
@end

@implementation YWYoukuDetailHeaderView


-(void)hideToolBar{
    
    self.downloadBtn.hidden = YES;
    self.saveToAlbumBtn.hidden = YES;
    
}
-(void)awakeFromNib{
    
    [super awakeFromNib];
}

+(instancetype)headerView{
    
    return [[NSBundle mainBundle] loadNibNamed:@"YWYoukuDetailHeaderView" owner:nil options:nil].lastObject;
}

- (IBAction)downloadBtnClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(headerViewDidClickDownload:)]) {
        [self.delegate headerViewDidClickDownload:self];
    }
}

- (IBAction)saveToAlbumBtnClick:(UIButton *)sender {
    if ([self.delegate respondsToSelector:@selector(headerViewDidClickSaveToAlbum:)]) {
        [self.delegate headerViewDidClickSaveToAlbum:self];
    }
}
@end
